package com.beans.ws;

public class RecadoBeanProxy implements com.beans.ws.RecadoBean {
  private String _endpoint = null;
  private com.beans.ws.RecadoBean recadoBean = null;
  
  public RecadoBeanProxy() {
    _initRecadoBeanProxy();
  }
  
  public RecadoBeanProxy(String endpoint) {
    _endpoint = endpoint;
    _initRecadoBeanProxy();
  }
  
  private void _initRecadoBeanProxy() {
    try {
      recadoBean = (new com.beans.ws.RecadoBeanServiceLocator()).getRecadoBeanPort();
      if (recadoBean != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)recadoBean)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)recadoBean)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (recadoBean != null)
      ((javax.xml.rpc.Stub)recadoBean)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.beans.ws.RecadoBean getRecadoBean() {
    if (recadoBean == null)
      _initRecadoBeanProxy();
    return recadoBean;
  }
  
  public com.beans.ws.Recado findbyIdRecado(int arg0) throws java.rmi.RemoteException{
    if (recadoBean == null)
      _initRecadoBeanProxy();
    return recadoBean.findbyIdRecado(arg0);
  }
  
  public com.beans.ws.Recado[] findAllRecado() throws java.rmi.RemoteException{
    if (recadoBean == null)
      _initRecadoBeanProxy();
    return recadoBean.findAllRecado();
  }
  
  public void deleteRecado(com.beans.ws.Recado arg0) throws java.rmi.RemoteException{
    if (recadoBean == null)
      _initRecadoBeanProxy();
    recadoBean.deleteRecado(arg0);
  }
  
  public void saveRecado(com.beans.ws.Recado arg0) throws java.rmi.RemoteException{
    if (recadoBean == null)
      _initRecadoBeanProxy();
    recadoBean.saveRecado(arg0);
  }
  
  public com.beans.ws.Recado updateRecado(com.beans.ws.Recado arg0) throws java.rmi.RemoteException{
    if (recadoBean == null)
      _initRecadoBeanProxy();
    return recadoBean.updateRecado(arg0);
  }
  
  public com.beans.ws.Recado findRecado(int arg0) throws java.rmi.RemoteException{
    if (recadoBean == null)
      _initRecadoBeanProxy();
    return recadoBean.findRecado(arg0);
  }
  
  
}